﻿
            $(function () {
                $('a.dialog').click(function () {
                    //e.preventDefault();
                    var url = $(this).attr('href');
                    alert(url);
                    showDialog(url);
                    return false;
                });

                $("#divcontent").dialog({
                    autoOpen: false,
                    height: 500,
                    width: 500,
                    modal: true,
                    buttons: {
                        Close: function () {
                            $(this).dialog("close");
                        }
                    }
                });

                function showDialog(url) {
                    // alert($("#divcontent").length);
                    //if ($("#divcontent").length > 1)
                    //{
                    //    $("#divcontent").empty();
                    //}
                    //$("#divcontent").find(".iframe").attr("src", url);
                    // $("#divcontent").parent().appendTo(jQuery("form:first"));
                    $("#divcontent").find("#myIframe").attr('src', url);

                    $("#divcontent").dialog("open");
                }

            });
